document.write(" <link rel=\"stylesheet\" href=\"/static/assets/css/login.css\">");


//axios封装post请求
function axiosPost(url,data) {
    let result = axios({
        method: 'post',
        url: url,
        data: data,
        header:{
            'Content-Type':'application/x-www-form-urlencoded',
            'contentType' : "application/json;charsetset=UTF-8"
        }
    }).then(resp=> {
        return resp.data;
    }).catch(error=>{
        return "exception="+error;
    });
    return result;
}

//get请求
function axiosGet(url,data) {
    var result = axios({
        method: 'get',
        url: url,
        data:data,
    }).then(function (resp) {
        return resp.data;
    }).catch(function (error) {
        return "exception=" + error;
    });
    return result;
}


export default {
    axiosPost,
    axiosGet
}